Repository navigation
Conversation
sawenzel
force-pushed
the
swenzel/o2sim-vecgeom-parallelworld
branch
2 times, most recently
from
November 17, 2026 11:48
1822820 to
d50502e
Compare
…vigator This fixes a problem in the VecGeom navigator and adds a unit test. - The locate after a crossing used the direction after the step, which multiple scattering can turn back into the volume just left. - The track was then put into the mother of two touching layers with a zero-length step, where electrons below the cut of the air were killed. - The crossing is now located along the direction of the step that found it, as the Geant4 navigator does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes event aborts of the VecGeom navigator for tracks tangent to a face between a volume with a magnetic field and one without, and adds a unit test. - The field propagator crosses such a face along its chord and the following straight step leaves it again, so the track alternates between the two volumes with zero-length steps. - The stuck-track push was also added to the chord step, which the propagator takes for a miss, so the crossing never happened and the event was aborted after 25 zero steps. - Now only steps along the momentum are lengthened once both kinds have occurred. - The push is capped at 10 um, below the thinnest layers of the detectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit lets G4.navmode=kVecGeom run with GeometryManagerParam.useParallelWorld and adds a unit test. - VecGeomParallelWorld holds the prioritised placements of the TGeo parallel world with a VecGeom IndexedBVH over their boxes. - The relocating navigator gives a node that holds the point priority in every locate, and limits step and safety by the nodes while the track is outside them. - The rules are those of TGeoParallelWorld: the node added first wins, and inside a node the others are not seen. - The propagating navigator still refuses the parallel world. - The walk from a Geant4 path to a VecGeom state moves into VecGeomG4Map, where the parallel world reuses it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sawenzel
force-pushed
the
swenzel/o2sim-vecgeom-parallelworld
branch
from
November 18, 2026 14:50
d50502e to
82f0ba6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VecGeom parallel world for simulation with a misaligned ITS
This PR introduces a parallel world for
G4.navmode=kVecGeom, the VecGeom counterpart of theTGeoParallelWorldthat gives the aligned ITS chips, sensors and metal stacks priority over the main hierarchy. This is an important step towards using VecGeom navigation in simulations with a misaligned geometry.It is enabled with the existing switch
GeometryManagerParam.useParallelWorld=true, as for TGeo, and follows the same rules: the node added first holds the point, and a track inside a node sees no other node. The nodes are searched with a VecGeomIndexedBVH. It is available for the defaultkRelocatingnavigator;kPropagatedrefuses the parallel world.The validation uses ITS + PIPE with the ITS alignment from CCDB. A unit test compares locate and ray entry with
TGeoParallelWorldon a toy geometry with misaligned, overlapping chips. In Pythia8 pp events the parallel world recovers the ITS hits lost with alignment, for both navigators:With the parallel world, VecGeom gives 0.999 ± 0.005 of the TGeo hit count in 1500 events, and for 5000 muons 99.6 % of the (muon, chip) pairs are the same.
Note that nothing changes when the parallel world is not requested: the hit counts per event and detector are identical to before. When it is used, it costs about 3–4 % of CPU time in an ITS + PIPE simulation, against about 5 % for TGeo.
In summary:
G4.navmode=kVecGeomcan now be run with ITS alignment and the parallel world, with ITS hits in agreement with TGeo navigation.This PR sits on top of #16133; only the last commit is new.
Assisted by Claude Code.